.PHONY: clean all

PROJ = report_HW1
IMAGE = pictures

all: AnswerB AnswerC AnswerD AnswerE AnswerF report_HW1.pdf

AnswerB : ProblemB.o
	g++ -o $@ $<

AnswerC : ProblemC.o
	g++ -o $@ $<

AnswerD : ProblemD.o
	g++ -o $@ $<

AnswerE : ProblemE.o
	g++ -o $@ $<

AnswerF : ProblemF.o
	g++ -o $@ $<

%.o: %.cpp
	g++ -c $< -o $@

$(PROJ).pdf : $(PROJ).tex $(IMAGE)
	xelatex $(PROJ)
	xelatex $(PROJ)

run:
	./AnswerB
	./AnswerC
	./AnswerD
	./AnswerE
	./AnswerF

clean:
	-@rm -f *.o Answer? \
	*.aux *.log *.pdf *.bbl \
	*.blg *.bcf *.out *.xml *.gz